using namespace std;
#include "dice.h"
#include <cstdlib>
#include <iostream>
#include <ctime>

dice::dice(void)
{
	srand(time(NULL));
	this->result = 1;
}

dice::~dice(void)
{
}

void dice::throw_dice()
{
	this->result = rand() % 6 + 1;
}

void dice::show_dice()
{
	/*
	cout << "\n\n ___________\n/           \\\n|           |\n|           |\n|           |\n|           |\n|           |\n\\___________/\n\n";
	*/
	switch (this->result)
	{
		case 1:
			cout << "\n\n ___________\n/           \\\n|           |\n|           |\n|     *     |\n|           |\n|           |\n\\___________/\n\n";
			break;
		case 2:
			cout << "\n\n ___________\n/           \\\n|  *        |\n|           |\n|           |\n|           |\n|        *  |\n\\___________/\n\n";
			break;
		case 3:
			cout << "\n\n ___________\n/           \\\n|  *        |\n|           |\n|     *     |\n|           |\n|        *  |\n\\___________/\n\n";
			break;
		case 4:
			cout << "\n\n ___________\n/           \\\n|  *     *  |\n|           |\n|           |\n|           |\n|  *     *  |\n\\___________/\n\n";
			break;
		case 5:
			cout << "\n\n ___________\n/           \\\n|  *     *  |\n|           |\n|     *     |\n|           |\n|  *     *  |\n\\___________/\n\n";
			break;
		case 6:
			cout << "\n\n ___________\n/           \\\n|  *     *  |\n|           |\n|  *     *  |\n|           |\n|  *     *  |\n\\___________/\n\n";
			break;
			
	}
}